package com.spn.blog.common.vo;

import java.io.Serializable;

public enum  ErrorCode implements Serializable {

    PARAMS_ERROR(10001,"参数有误"),
    ACCOUNT_PWD_NOT_EXIST(10002,"用户名不存在"),
    TOKEN_ERROR(10003,"token不合法"),
    TOKEN_NULL_ERROR(1004,"token不合法,并且是NULL值"),
    ACCOUNT_EXIST(10005,"账号已存在"),
    ACCOUNT_NOT_EXIST(10006,"账号不存在"),
    PWD_ERROR(10007, "密码错误"),

    NO_PERMISSION(70001,"无访问权限"),
    SESSION_TIME_OUT(90001,"会话超时"),
    NO_LOGIN(90002,"未登录"),

    EMAIL_EXIST(10007,"邮箱已被注册"),
    EMAIL_SECURITY_CODE_ERROR(20000,"邮箱验证码有误"),
    EMAIL_SECURITY_CODE_RECOMMIT_ERROR(20002,"邮箱验证码2分钟内不可重复发送"),
    EMAIL_REGISTER_ERROR_ERROR(20001,"邮箱缓存删除失败"),
    EMAIL_ADDR_NULL_ERROR(20003,"邮箱地址不能为空");

    private int code;
    private String msg;

    ErrorCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
